<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>
<!-- th:if 条件成立就显示 -->
<h1 th:if="${flag=='yes'}" >英雄联盟</h1>
<!-- th:unless 条件不成立就显示 -->
<h1 th:unless="${flag=='no'}" >LOL</h1>
<!-- switch选择语句 -->
<div th:switch="${menu}">
    <p th:case="'admin'">User is an administrator</p>
    <p th:case="${manager}">User is a manager</p>
</div>
</body>
</html>

